using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ERP.EquipmentManage.Dtos
{
    /// <summary>
    /// 更新设备维护计划DTO
    /// </summary>
    public class UpdateEquipmentMaintenancePlanDto
    {
        /// <summary>
        /// 计划编码（唯一标识）
        /// </summary>
        [Required(ErrorMessage = "计划编码不能为空")]
        [StringLength(50, ErrorMessage = "计划编码长度不能超过50个字符")]
        public string PlanCode { get; set; }

        /// <summary>
        /// 计划名称
        /// </summary>
        [Required(ErrorMessage = "计划名称不能为空")]
        [StringLength(20, ErrorMessage = "计划名称长度不能超过20个字符")]
        public string PlanName { get; set; }

        /// <summary>
        /// 计划类型
        /// </summary>
        [Required(ErrorMessage = "计划类型不能为空")]
        [StringLength(20, ErrorMessage = "计划类型长度不能超过20个字符")]
        public string PlanType { get; set; }

        /// <summary>
        /// 执行频率数值
        /// </summary>
        [Range(1, int.MaxValue, ErrorMessage = "频率必须大于0")]
        public int Frequency { get; set; }

        /// <summary>
        /// 频率单位
        /// </summary>
        [Required(ErrorMessage = "频率单位不能为空")]
        [StringLength(20, ErrorMessage = "频率单位长度不能超过20个字符")]
        public string FrequencyUnit { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedAt { get; set; }

        /// <summary>
        /// 最后更新时间
        /// </summary>
        public DateTime UpdatedAt { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        [StringLength(10, ErrorMessage = "状态长度不能超过10个字符")]
        public string Status { get; set; }

        /// <summary>
        /// 备注信息
        /// </summary>
        [StringLength(20, ErrorMessage = "备注信息长度不能超过20个字符")]
        public string Remark { get; set; }
    }
} 